package org.linlinjava.litemall.db.service;

import java.util.List;

import javax.annotation.Resource;

import org.linlinjava.litemall.db.dao.LitemallFormPurchaseMapper;
import org.linlinjava.litemall.db.domain.LitemallFormPurchase;
import org.linlinjava.litemall.db.domain.LitemallFormPurchaseExample;
import org.linlinjava.litemall.db.domain.LitemallFormPurchaseItem;
import org.linlinjava.litemall.db.domain.LitemallGoods.Column;
import org.springframework.stereotype.Service;

@Service
public class LitemallPurchaseService {
    Column[] columns = new Column[]{Column.id, Column.name, Column.brief, Column.picUrl, Column.isHot, Column.isNew, Column.counterPrice, Column.retailPrice};
    @Resource
    private LitemallFormPurchaseMapper formPurchaseMapper;

    public LitemallFormPurchase findById(Integer Id) {
        return formPurchaseMapper.selectByPrimaryKey(Id);
    }

    public List<LitemallFormPurchase> selectByExample(LitemallFormPurchaseExample example){
        return formPurchaseMapper.selectByExample(example);
    }

    public void insertSelective(LitemallFormPurchase purchaseExample) {
        formPurchaseMapper.insertSelective(purchaseExample);
    }

    public void updateByPrimaryKeySelective(LitemallFormPurchase purchaseExample) {
        formPurchaseMapper.updateByPrimaryKeySelective(purchaseExample);
    }

    public LitemallFormPurchase selectByPrimaryKey(Integer id) {
       return formPurchaseMapper.selectByPrimaryKey(id);
    }

}
